﻿#ifndef DIALOG_LOG_H
#define DIALOG_LOG_H

#include <QObject>
#include <QDialog>
#include <QWidget>
#include "controller.h"
QT_BEGIN_NAMESPACE
namespace Ui { class Dialog_log; }
QT_END_NAMESPACE

class Dialog_log : public QDialog
{
    Q_OBJECT
public:
    explicit Dialog_log(Controller *mc, QWidget *parent = nullptr);
    ~Dialog_log();
public slots:
    void show_text(QString t, QColor color = Qt::white);
    void log_data_recved(int src, int dest, QString text);
signals:
private slots:
    void on_pushButton_clicked();

    void on_checkBox_stateChanged(int arg1);

private:
    Ui::Dialog_log *ui;
    Controller *mc;
    QMap<int, QString> logs;
    bool auto_scroll;
};

#endif // DIALOG_LOG_H
